﻿using System.Collections.Generic;
using Microsoft.Xna.Framework;

namespace Nyx.Scenes
{
    using XColor = Microsoft.Xna.Framework.Color;

    /// <summary>
    /// 
    /// </summary>
    public class SceneObject
    {
        List<SceneValue> values = new List<SceneValue>();

        /// <summary>
        /// Initializes a new instance of the <see cref="SceneObject"/> class.
        /// </summary>
        public SceneObject()
        {
            this.Color = new XColor(1f, 0f, 0f, .8f);
            this.Scale = Vector2.One;
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="SceneObject"/> class.
        /// </summary>
        /// <param name="name">The name.</param>
        public SceneObject(string name)
            : this()
        {
            this.Name = name;
        }

        /// <summary>
        /// Gets or sets the color.
        /// </summary>
        /// <value>The color.</value>
        public XColor Color { get; set; }

        /// <summary>
        /// Gets or sets the height of the object (in pixels).
        /// </summary>
        /// <value>The height of the object (in pixels).</value>
        public int Height { get; set; }

        /// <summary>
        /// Gets or sets the material.
        /// </summary>
        /// <value>The material.</value>
        public SceneMaterial Material { get; set; }

        /// <summary>
        /// Gets or sets the name.
        /// </summary>
        /// <value>The name.</value>
        public string Name { get; set; }

        /// <summary>
        /// Gets or sets the origin (pivot point).
        /// </summary>
        /// <value>The origin (pivot point).</value>
        public Vector2 Origin { get; set; }

        /// <summary>
        /// Gets or sets the position.
        /// </summary>
        /// <value>The position.</value>
        public Vector2 Position { get; set; }

        /// <summary>
        /// Gets or sets the rotation (in radians).
        /// </summary>
        /// <value>The rotation (in radians).</value>
        public float Rotation { get; set; }

        /// <summary>
        /// Gets or sets the scale.
        /// </summary>
        /// <value>The scale.</value>
        public Vector2 Scale { get; set; }

        /// <summary>
        /// Gets the values.
        /// </summary>
        /// <value>The values.</value>
        public IEnumerable<SceneValue> Values
        {
            get { return values; }
        }

        /// <summary>
        /// Gets or sets the width of the object (in pixels).
        /// </summary>
        /// <value>The width of the object (in pixels).</value>
        public int Width { get; set; }
    }
}
